package manage.service;

import m.common.model.util.ModelCheckUtil;
import m.common.model.util.ModelUpdateUtil;
import m.common.service.Service;
import m.system.cache.CacheUtil;
import manage.model.SystemInfo;

public class SystemInfoService extends Service {
	/**
	 * 获取唯一的后台设置
	 * 
	 *  Exception
	 */
	public SystemInfo getUniqueModel(){
		return CacheUtil.get(SystemInfo.class,"");
	}
	public String save(SystemInfo model) throws Exception {
		ModelCheckUtil.checkNotNull(model,"backgroundTitle");
		ModelUpdateUtil.updateModel(model);
		CacheUtil.clear(SystemInfo.class);
		return "保存成功,请刷新页面";
	}
}
